# -*- coding : utf-8-*-
#初始化
week=0

#自定义文本句子获取(sen.txt)
#取自issue #1(By AdminWhaleFall)

def txt():
    import random
    with open('sen.txt', 'r' , encoding='utf8') as f:
        datas = f.readlines()
        data  =  random.choice(datas)
    if data.strip() == '':
        txt()
    else:
        return data.strip() 

#介绍
print('欢迎使用Plan list making！') 
print('当前版本V3.0')
print('作者:White_mu Github:@WhitemuTeam')
doc=open('weekplan.md','w')
#开始
t=int(input('请输入需要制作的计划清单页数：'))
#导出
while (t > 0):
    week=week+1
    sens=txt() #从sen.txt中获取句子
    print('# Week ',week,file=doc) #标题（默认为Week，可更改为Day，例如:'#Day ',week）
    print(sens,file=doc) #引用句子
    print('# **□** **1. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **2. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **3. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **4. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **5. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **6. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **7. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **8. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **9. _______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **10. ______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **11. ______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **12. ______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **13. ______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **14. ______________________________________________________________________________________________________________________________**',file=doc)
    print('# **□** **15. ______________________________________________________________________________________________________________________________**',file=doc)
    #每日小结（可自行选择删除）
    print('# 本周小结：',file=doc)
    print('# **________________________________________________________________________________________________________________________________________________**',file=doc)
    print('# **________________________________________________________________________________________________________________________________________________**',file=doc)
    print('# **________________________________________________________________________________________________________________________________________________**',file=doc)
    t=t-1
doc.close()
print('导出完成，请打开weekplan.md查看')
input('按任意键关闭此程序')
#end
